<?php
/**
 * 
 * 刷新并获取所有省的名称
 * 
 */

include('./config/db.php');
$pgdb = new PGDB;

$sql = "select * from public.management_t where par_id = 0 order by id";
$res = $pgdb->query($sql);

$provinces = array();
while($row = pg_fetch_row($res)){
    $provinces[] = $row;
}

die(json_encode(array('Code'=>0x000000,'Msg'=>'获取完成','Data'=>$provinces)));